﻿#region System Namespace
using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Threading;
#endregion System Namespace

#region Foreign Namespace
#endregion Foreign Namespace

#region Styx Namespace
using Styx;
using Styx.Helpers;
using Styx.Plugins;
using Styx.Common;
using Styx.CommonBot;
using Styx.WoWInternals;
using Styx.WoWInternals.WoWObjects;
#endregion Styx Namespace

namespace ReadyCheck
{
    public class ReadyCheck : HBPlugin
    {
        public override string Name { get { return "ReadyCheck"; } }
        public override string Author { get { return "Giwin"; } }
        public override Version Version { get { return new Version(1, 0); } }
        public override bool WantButton { get { return true; } }


        public override void Initialize()
        {
            Lua.Events.AttachEvent("READY_CHECK", Ready);
            Logging.Write("ReadyCheck - Loaded Version " + Version);
        }

        public override void Pulse()
        {
            if (StyxWoW.IsInGame)
            {
                //to call a setting its 
                if (StyxWoW.Me.IsAlive)
                {

                }
            }
        }
        public void Ready(object sender, LuaEventArgs args)
        {
            Random r = new Random();
            Logging.Write("[ReadyCheck]: 'Ready Check' menu detected, clicking Ready in 1.5 - 3.5 seconds");
            Thread.Sleep(r.Next(1500,3500));
            Lua.DoString("RunMacroText(\"/click ReadyCheckFrameYesButton\");");
        }
    }
}